#define _CRT_SECURE_NO_WARNINGS  1


class Solution {
public:
    int firstUniqChar(string s)
    {
        for (int i = 0; i < s.size(); ++i)
        {
            int n = s.find(s[i]);
            int rn = s.rfind(s[i]);
            if (n == rn)
                return i;
        }
        return -1;
    }
};